package com.tianji.api.client.aigc.fallback;

import com.tianji.api.client.aigc.AigcClient;
import com.tianji.api.client.learning.LearningClient;
import com.tianji.api.dto.leanring.LearningLessonDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

@Slf4j
public class AigcClientFallback implements FallbackFactory<AigcClient> {

    @Override
    public AigcClient create(Throwable cause) {
        log.error("查询AIGC服务异常", cause);
        return new AigcClient() {

            @Override
            public String text(String question) {
                return "";
            }
        };
    }
}
